package com.oig.sys.base.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;

import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
@Schema
public class EnumVo {

    @Schema(description = "主键id")
    private Integer id;

    @Schema(description = "枚举类型编码 主键")
    private String dictCode;

    @Schema(description = "枚举类型名")
    private String dictName;

    @Schema(description = "通用状态 01-草拟 02-待审核 03-不通过 04-正常 05-删除")
    private String status;

    @Schema(description = "是否可修改 0-否 1-是 默认1，目前控制不能删除")
    private String modifyFlag;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "当枚举项需要分组时，可以配一个父枚举，枚举项按父枚举的枚举值分组")
    private String parentDictCode;

    @Schema(description = "创建人")
    private String createUserName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "最后更新人")
    private String lastUpdateName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "最后更新时间")
    private Date lastUpdateTime;


    @Schema(description = "枚举值列表")
    private List<EnumItemVo> enumItemList;

    public EnumVo(){}

    public EnumVo(Integer id, String dictCode, String dictName, String status, String modifyFlag,String remark,
                  String parentDictCode, String createUserName, Date createTime, String lastUpdateName, Date lastUpdateTime){
        this.id = id;
        this.dictCode = dictCode;
        this.dictName = dictName;
        this.status = status;
        this.modifyFlag = modifyFlag;
        this.remark = remark;
        this.parentDictCode = parentDictCode;
        this.createUserName = createUserName;
        this.createTime = createTime;
        this.lastUpdateName = lastUpdateName;
        this.lastUpdateTime = lastUpdateTime;
    }
}
